import { createI18n } from 'vue-i18n'
import enLocale from './en.js'
import zhLocale from './zh.js'

const messages = {
  en: {
    el: {},
    ...enLocale
  },
  zh: {
    el: {},
    ...zhLocale
  }
}

const i18n = createI18n({
  legacy: false, // Vue 3 composition API mode
  locale: localStorage.getItem('locale') || 'zh', // Default language - changed to Chinese
  fallbackLocale: 'zh', // Fallback language - changed to Chinese
  messages,
})

export default i18n